package com.scut.fy.gateway.auth;

import cn.dev33.satoken.id.SaIdUtil;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @author oms
 */
@Configuration
public class  SaIdTokenRefreshTask {

    /**
     * 从0 分钟开始，每隔 5 分钟执行一次 Id-Token
     */
    @Scheduled(cron = "0 0/5 * * * ? ")
    public void refreshToken() {
        SaIdUtil.refreshToken();
    }
}
